package com.berchen.数据结构.单链表;

public class SingleLinketListTest {

    public static void main(String[] args){

        SingleLinketList linketList=new SingleLinketList();

        linketList.add(new Node(1,"chen","陈"));
        linketList.add(new Node(2,"wan","琬"));
        linketList.add(new Node(3,"hao","皓"));
//        linketList.list();

        linketList.add(new Node(4,"wangwu","王五"));
//        linketList.list();

//        linketList.update(new Node(4,"lisi","李四"));
//        linketList.list();

        linketList.delete(2);
//        System.out.println();
//
//        linketList.list();
//
//        System.out.println(linketList.getCount());
//
//        System.out.println(linketList.getNode(2));
//
//        linketList.delete(1);
//        linketList.delete(4);
        linketList.list();
//
//        System.out.println("反转");
//
//        linketList.reverse();
//
//        linketList.list();

        System.out.println("从尾到头打印链表");

        linketList.listEndToStart(linketList.getHead());
        System.out.println("通过stack进行从尾到头打印");
        linketList.listStack();
    }
}
